﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Goway.StackingUC.Forms
{
    /// <summary>
    /// 显示处理结果对话框
    /// </summary>
    public partial class FrmTipsRich : Form
    {
        /// <summary>
        /// 显示处理结果对话框
        /// </summary>
        /// <param name="title">标题</param>
        /// <param name="successCount">成功数描述内容</param>
        /// <param name="failCount">失败数描述内容</param>
        /// <param name="showContent">展示的内容</param>
        public FrmTipsRich(string title, string successCount, string failCount, string showContent)
        {
            InitializeComponent();
            // 设置不在任务栏显示窗体
            this.ShowInTaskbar = false;
            this.lblTitle.Text = title;
            this.lblSuccessCount.Text = successCount;
            this.lblFailCount.Text = failCount;
            this.txtErroData.Text = showContent;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void FrmTipsRich_Activated(object sender, EventArgs e)
        {
            this.btnOK.Focus();
        }

        #region 窗口可移动

        private void lblTitle_MouseDown(object sender, MouseEventArgs e)
        {
            ShapedFormHelper.FormDrag(this.Handle);
        }

        #endregion
    }
}
